package day03;

public class Homework2 {
    public static void main(String[] args) {
        //1
        System.out.println("-------1---------");
        int a=5,b=10;
        int max=a>b?a:b;
        System.out.println(max);
        if (a>b){
            System.out.println("最大值为"+a);
        }else {
            System.out.println("最大值为"+b);
        }
        //2
        System.out.println("----------2---------");
        int year = 2024;
        if(year%4==0 && year%100!=0 || year%400==0){
            System.out.println(year+"年是闰年");
        }else {
            System.out.println(year+"年是平年");
        }
        //3
        System.out.println("----------3-----------");
        int score = -20;
        if (score >100 || score<0){
            System.out.println("成绩不合法");
        } else if (score>=90) {
            System.out.println("成绩是A");
        } else if (score>=80) {
            System.out.println("成绩是B");
        } else if (score>=60) {
            System.out.println("成绩是C");
        }else {
            System.out.println("成绩是D");
        }
    }
}
